package com.dinzeer.sjapadder.effect;

import com.dinzeer.sjapadder.register.SjaEffect;
import mods.flammpfeil.slashblade.event.SlashBladeEvent;
import mods.flammpfeil.slashblade.slasharts.Drive;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import org.apache.commons.lang3.ObjectUtils;
@Mod.EventBusSubscriber
public class ForLifesDrive  extends MobEffect {
    public ForLifesDrive() {
        super(MobEffectCategory.BENEFICIAL, -26368);
    }
    @SubscribeEvent
    public static void doForLifeDrive(SlashBladeEvent.DoSlashEvent event){
        if (event.getUser().hasEffect(SjaEffect.ForLifeDrive.get())){
            Drive.doSlash(event.getUser(),
                    event.getRoll(),  20, 327424, Vec3.ZERO,false,
                    event.getDamage()
                            *(event.getUser().getEffect(SjaEffect.ForLifeDrive.get()).getAmplifier()*0.3),
                    null,2f) ;
        }
    }
}
